<?php

/**
 * LevelStudyKit form base class.
 *
 * @package    elearning
 * @subpackage form
 * @author     Your name here
 */
class BaseLevelStudyKitForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'level_id'   => new sfWidgetFormPropelChoice(array('model' => 'Level', 'add_empty' => false)),
      'lsk_image'  => new sfWidgetFormInput(),
      'lsk_link'   => new sfWidgetFormInput(),
      'lsk_status' => new sfWidgetFormInput(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'LevelStudyKit', 'column' => 'id', 'required' => false)),
      'level_id'   => new sfValidatorPropelChoice(array('model' => 'Level', 'column' => 'id')),
      'lsk_image'  => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'lsk_link'   => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'lsk_status' => new sfValidatorInteger(),
      'created_at' => new sfValidatorDateTime(array('required' => false)),
      'updated_at' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('level_study_kit[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'LevelStudyKit';
  }

  public function getI18nModelName()
  {
    return 'LevelStudyKitI18n';
  }

  public function getI18nFormClass()
  {
    return 'LevelStudyKitI18nForm';
  }

}
